package com.abvnet.project.water.project.service;

import com.abvnet.common.utils.text.Convert;
import com.abvnet.project.water.project.domain.ProjectComment;
import com.abvnet.project.water.project.mapper.ProjectCommentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 员工互评 服务层实现
 * 
 * @author duj
 * @date 2019-07-19
 */
@Service
public class ProjectCommentServiceImpl implements IProjectCommentService {
	@Autowired
	private ProjectCommentMapper projectCommentMapper;

	/**
     * 查询员工互评信息
     * 
     * @param commentId 员工互评ID
     * @return 员工互评信息
     */
    @Override
	public ProjectComment selectProjectCommentById(Long commentId) {
	    return projectCommentMapper.selectProjectCommentById(commentId);
	}
	
	/**
     * 查询员工互评列表
     * 
     * @param projectComment 员工互评信息
     * @return 员工互评集合
     */
	@Override
	public List<ProjectComment> selectProjectCommentList(ProjectComment projectComment) {
	    return projectCommentMapper.selectProjectCommentList(projectComment);
	}

    @Override
    public List<ProjectComment> selectProjectCommentListForApi(ProjectComment projectComment) {
        return projectCommentMapper.selectProjectCommentListForApi(projectComment);
    }

    /**
     * 新增员工互评
     * 
     * @param projectComment 员工互评信息
     * @return 结果
     */
	@Override
	public int insertProjectComment(ProjectComment projectComment) {
	    return projectCommentMapper.insertProjectComment(projectComment);
	}
	
	/**
     * 修改员工互评
     * 
     * @param projectComment 员工互评信息
     * @return 结果
     */
	@Override
	public int updateProjectComment(ProjectComment projectComment) {
	    return projectCommentMapper.updateProjectComment(projectComment);
	}

	/**
     * 删除员工互评对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteProjectCommentByIds(String ids) {
		return projectCommentMapper.deleteProjectCommentByIds(Convert.toStrArray(ids));
	}
	
}